{% extends "device.html" %}

{% block right %}
    <div class="content">
      <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/device.css">
      <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/tables.css">

      <div>
        <form id="form1" name="form1" method="post" action="">
        {% if ERROR %}
            <h4 style="text-align: center; color: red; ">数据不能为空</h4> <br>
        {% endif %}
          <label>设备IP &nbsp;
          <input type="text" name="IP" /> &nbsp;
          <label>Cpu &nbsp;
          <input type="text" name="CPU" /> &nbsp;
          <label>Mem &nbsp;
          <input type="text" name="MEM" /> &nbsp;
          <label>Disk &nbsp;
          <input type="text" name="DISK" />
          <br>
          <label>设备位置&nbsp;
          <input type="text" name="POSITION" /> &nbsp;
          <label>运行服务&nbsp;
          <input type="text" name="SERVER" /> &nbsp;
          <label>所属人&nbsp;
          <input type="text" name="OWNER" /> &nbsp;
          <label>设备状态&nbsp;
          <select name="STATE">
            <option value="空闲">空闲</option>
            <option value="使用中">使用中</option>
          </select> &nbsp;
          <input type="hidden" name="Type" value="Add" />
          <input type="submit" name="Button" id="button" value="提交" />
        </form>
      </div>
        
        {% if DBDA %}
        <div style="text-align;" class="tables"> 
          <table class="colorTable" style="width:98%;" border="1" cellspacing="0" cellpadding="0" align="center"> 
          <tbody> 
            <caption>您刚刚插入了新的数据</caption> 
            <tr> 
            <th width="12.5%" height="15" valign="top" bgcolor="#CCCCCC"> 
            <p align="center">设备IP</p> 
            </th> 
            <th width="12.5%"  valign="top" bgcolor="#CCCCCC"> 
            <p align="center">CPU信息</p> 
            </th> 
            <th width="12.5%" valign="top" bgcolor="#CCCCCC"> 
            <p align="center">内存信息</p> 
            </th> 
            <th width="12.5%" valign="top" bgcolor="#CCCCCC"> 
            <p align="center">磁盘信息</p> 
            </th> 
            <th width="12.5%" valign="top" bgcolor="#CCCCCC"> 
            <p align="center">设备位置</p> 
            </th> 
            <th width="12.5%" valign="top" bgcolor="#CCCCCC"> 
            <p align="center">设备状态</p> 
            </th> 
            <th width="12.5%" valign="top" bgcolor="#CCCCCC"> 
            <p align="center">所运行服务</p> 
            </th> 
            <th width="12.5%" valign="top" bgcolor="#CCCCCC"> 
            <p align="center">所属人</p> 
            </th> 
            </tr> 
            
            <tr> 
            </td height=10 > 
            <td > 
            <p>{{ DBDA.IP }}</p> 
            </td> 
            <td > 
            <p>{{ DBDA.CPU }}</p> 
            </td> 
            <td > 
            <p>{{ DBDA.MEM }}</p> 
            </td> 
            <td > 
            <p>{{ DBDA.DISK }}</p> 
            </td> 
            <td > 
            <p>{{ DBDA.POSITION }}</p> 
            </td> 
            <td > 
            <p>{{ DBDA.STATE }}</p> 
            </td> 
            <td > 
            <p>{{ DBDA.SERVER }}</p> 
            </td> 
            <td > 
            <p>{{ DBDA.OWNER }}</p> 
            </td> 
            </tr> 
        
          </tbody> 
          </table>
        </div> 
        {% endif %}

    </div>  
{% endblock %}
